package cn.jinjimi.app.main.activity;

import android.content.Intent;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

import cn.jinjimi.app.R;
import cn.jinjimi.app.main.extend.ToolBarCommonActivity;
import cn.jinjimi.app.main.fragment.ReaderDetailFragment;

public class ReaderDetailActivity extends ToolBarCommonActivity {

    ReaderDetailFragment fragment;

    @Override
    protected void beforeInitView() {
        setContentView(R.layout.activity_view);
        setSwipeEnabled(false);
    }

    @Override
    protected void initial() {
        initView();
    }

    protected void initView() {
        setTitle("文章详情");
        fragment = new ReaderDetailFragment();
        FragmentManager fm = this.getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        ft.add(R.id.content_fragment, fragment, "ARTICLEDETAIL");
        ft.commit();
    }

    @Override
    public void onBackPressed() {
        fragment.onBackPressed();
    }


    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }
}